import React from "react";
import "./index.less";
import { connect } from "react-redux";
import { cartlistAction } from "store/actions/carts";

function index({ list }) {
    return (
        <div className="cart-container">
            <div className="product-item">
                <div className="goods-checked">
                    <input type="checkbox" />
                </div>
                <div className="goods-img">
                    <img
                        src="https://hotkidceo-1251330842.cos.ap-shanghai.myqcloud.com/2021042814400005318.jpg"
                        alt=""
                    />
                </div>
                <div className="goods-info">
                    <div className="goods-title">东面</div>
                    <div className="goods-desc">巧克力85ml</div>
                    <div className="goods-aditor">
                        <div>
                            <span className="price-unit">￥</span>
                            <span className="goods-price">18</span>
                        </div>
                        <div className="goods-num-editor">
                            <span>-</span>
                            <input type="text" readOnly={true} value={1} />
                            <span>+</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    );
}

const mapStateToProps = ({ cartlist }) => {
    return { list: cartlist };
};

export default connect(mapStateToProps, {
    cartlistAction,
})(index);
